package com.yami.shop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.domain.User;
import com.yami.shop.domain.param.UserRegisterParam;

public interface IUserService extends IService<User> {
    /**
     * 根据用户id获取用户信息
     * @param userId
     * @return
     */
    User getUserByUserId(String userId);

    /**
     * 校验验证码
     * @param userRegisterParam
     * @param checkRegisterSmsFlag
     */
    void validate(UserRegisterParam userRegisterParam, String checkRegisterSmsFlag);

    /*
     * 新增用户
     * @param user
     * @author 文永达
     * @date 2023/3/14 21:50
     */
    int insertUser(User user);

    /**
     * 修改用户
     * @param user
     * @author 文永达
     * @date 2023/3/14 21:51
     */
    int updateUser(User user);

    boolean register(UserRegisterParam userRegisterParam);
}
